﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script  type="text/javascript">
        (function () {
            var showCount = 0;

            window.onload = function () {
                alert(" page load");
            }

            //只有在firefox中才有用
            window.onpageshow = function (event) {
                showCount++;
                alert("showcout:" + showCount + "\n persisted:" + event.persisted);
            }
        })();
    </script>
</head>
<body>
    <h1> Page Show </h1>
    <a href="http://www.baidu.com">go to baidu</a>
</body>
</html>
